package com.club.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * @Author Administrator
 * @Date 2023/1/11 16:49
 * @Version 1.0
 */
@TableName(value = "sys_pub")
@Data
@Builder(toBuilder = true)
public class SysPub {

    /**
     * 主键
     */
    @TableId(value = "pub_id", type = IdType.AUTO)
    private int pubId;

    /**
     * 通知内容
     */
    @TableField(value = "pub_message")
    private String pubMessage;

    /**
     * 创建日期
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
